<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>lucene 管理</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<jsp:include page="../loginUser.jsp" flush="true"/>
		
		<jsp:include page="../basic/easyui_loder.jsp" flush="true"/>
		
		<script type="text/javascript" src="<%=path%>/js_lib/lucene/jsUtil.js"></script>
		<script type="text/javascript" src="<%=path%>/js_lib/lucene/searchWindow.js"></script>
		<script type="text/javascript" src="<%=path%>/js_lib/lucene/addNewIndex.js"></script>
		<script type="text/javascript" src="<%=path%>/js_lib/lucene/luceneManager.js"></script>
		
	</head>

	<body>
		<div class="easyui-layout" style="height:1365px;border: 1px solid #AFAFAF; padding: 2px;">
			
			<div region="west" split="true" title="lucene索引路径" style="width: 300px; padding: 4px;">
				<ul id="tree"></ul>
			</div>
			<div region="center" border="false">
				<table id="allData"></table>
			</div>
			
		</div>
		
		<!-- 新增窗口 -->
		<div id="insertWindow" title="新增"  style="width: 600px; height: 500px; padding: 5px; ">
			<div class="easyui-layout" fit="true">
				<div region="center" style="padding: 10px;">
					<table id="insertTab"></table>
				</div>
				<div region="south" style="text- align: center; height: 30px;">
					<div style="width: 100%; text-align: center; min-width: 200px;">
						<a class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)" onclick="resetInsertGrid()">重置</a>
						&nbsp;&nbsp;&nbsp;
						<a class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" onclick="createOrUpdateDoc('create')">保存</a>
					</div>
				</div>
			</div>
		</div>
		
		<!-- 修改窗口 -->
		<div id="updateWindow" title="修改"  style="width: 600px; height: 500px; padding: 5px;">
			<div class="easyui-layout" fit="true">
				<div region="center" style="padding: 10px;">
					<table id="updateTab"></table>
				</div>
				<div region="south" style="text- align: center; height: 30px;">
					<div style="width: 100%; text-align: center; min-width: 200px;">
						<a class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)" onclick="resetUpdateGrid()">重置</a>
						&nbsp;&nbsp;&nbsp;
						<a class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" onclick="createOrUpdateDoc('update')">保存</a>
					</div>
				</div>
			</div>
		</div>
		
		<!-- 修改窗口 -->
		<div id="searchWindow" title="查找"  style="width: 500px; height: 350px; padding: 5px;">
			<div class="easyui-layout" fit="true">
				<div region="center" style="padding: 10px;">
					<br/>
					<table align="center">
						<tr>
							<td>字段名称：</td>
							<td><input id="searchName" type="text"/></td>
						</tr>
						<tr>
							<td>字段类型：</td>
							<td>
								<input id="searchType"/>
							</td>
						</tr>
						<tr>
							<td>关键字/范围开始值：</td>
							<td><input id="searchKeyword" type="text"/></td>
						</tr>
						<tr>
							<td>范围结束值：</td>
							<td><input id="endRange" type="text"/></td>
						</tr>
					</table>
					<br/>
					<div style="tefont-size: smaller;color: red;">
						<div style="margin-left: 60px;">
							提示：<br/>
							<div style="margin-left: 20px;">
								1、任何字段为空时，都会进行全检索<br/>
								2、StringField 查询字符串字段，不进行分词<br/>
								3、TextField 查询字符串字段，并进行分词<br/>
								4、IntField 查询整型字段<br/>
								5、LongField 查询长整型字段，比如日期，格式: yyyyMMddHHmmss<br/>
								6、范围结束值只有在字段类型为 IntField 和 LongField 时才有效<br/>
							</div>
						</div>
					</div>
				</div>
				<div region="south" style="text- align: center; height: 30px;">
					<div style="width: 100%; text-align: center; min-width: 200px;">
						<a class="easyui-linkbutton" icon="icon-search" href="javascript:void(0)" onclick="searchData()">查找</a>
					</div>
				</div>
			</div>
		</div>
		
		<br/><br/><br/>
		
	</body>
</html>
